package com.yang.news.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.EnumSet;

@Getter
@AllArgsConstructor
public enum HotSearchEnum {

    /**
     * 抖音
     */
    DOUYIN("DOUYIN", "抖音"),
    BAIDU("BAIDU", "百度"),
    ZHIHU("ZHIHU", "知乎"),
    BAIDU_TIEBA("BAIDU_TIEBA","百度贴吧"),
    JUEJIN("JUEJIN","掘金"),
    HUPU("HUPU","虎扑"),
    WEIBO("WEIBO","微博"),
    BILIBILI("BILIBILI", "B站");

    private String code;
    private String desc;

    public static HotSearchEnum of(byte code) {
        return EnumSet.allOf(HotSearchEnum.class).stream().filter(x -> x.code.equals(code)).findFirst().orElse(null);
    }

}
